{% capture categories %}
  {% if post %}
    {% for category in post.categories %}
        <a href="{{ root_url }}/{{ site.category_dir }}#{{ category }}" title="Category: {{ category }}" rel="category">{{ category | join: "/" }}</a>{% unless forloop.last %}&nbsp;{% endunless %}
    {% endfor %}
  {% else %}
    {% for category in page.categories %}
        <a href="{{ root_url }}/{{ site.category_dir }}#{{ category }}" title="Category: {{ category }}" rel="category">{{ category | join: "/" }}</a>{% unless forloop.last %}&nbsp;{% endunless %}
    {% endfor %}
  {% endif %}
{% endcapture %}
{% capture category_size %}{{ categories | strip_newlines | replace: ' ', '' | size }}{% endcapture %}
{% unless category_size == '0' %}
<!-- <span class="point">•</span> -->
<span class="categories">
  <i class="fa fa-th-list"></i>{{ categories }}
  <!-- <span class="point">•</span> -->
</span>
{% endunless %}
